package guiPackage;

import java.awt.BorderLayout;
import java.awt.GridLayout;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;

public class StartScherm extends JPanel {
	private JLabel serverLabel, usernameLabel, passwordLabel, dbNameLabel;
	private JTextField serverField, usernameField, passwordField, dbNameField;
	private JButton inleesButton;

	public StartScherm() {
		setLayout(new GridLayout(5, 2));
		serverLabel = new JLabel("server: ");
		usernameLabel = new JLabel("username: ");
		passwordLabel = new JLabel("password: ");
		dbNameLabel = new JLabel("dbname: ");
		serverField = new JTextField(12);
		usernameField = new JTextField(12);
		passwordField = new JTextField(12);
		dbNameField = new JTextField(12);
		inleesButton = new JButton("Inlezen");
		add(serverLabel);
		add(serverField);
		add(usernameLabel);
		add(usernameField);
		add(passwordLabel);
		add(passwordField);
		add(dbNameLabel);
		add(dbNameField);
		add(inleesButton);
	}

	public void setListener(ActionListener listener) {
		inleesButton.addActionListener(listener);
	}

	public JButton getInleesButton() {
		return inleesButton;
	}

	public JTextField getServerField() {
		return serverField;
	}

	public JTextField getUsernameField() {
		return usernameField;
	}

	public JTextField getPasswordField() {
		return passwordField;
	}

	public JTextField getDbNameField() {
		return dbNameField;
	}
}
